package com.lh.controller;

import com.alibaba.fastjson.JSONObject;
import com.lh.entity.table.LeadLeader;
import com.lh.entity.table.ProblemFeedback;
import com.lh.service.ProblemFeedbackService;
import com.lh.utils.Answer;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/problemFeedback")
public class ProblemFeedbackController {

    @Resource
    private ProblemFeedbackService problemFeedbackService;


    @RequestMapping("/getProblemFeedbackPage")
    public Answer<Object> getProblemFeedbackPage(@RequestBody JSONObject reqJson) {
        return problemFeedbackService.getProblemFeedbackPage(reqJson);
    }

    @RequestMapping("/addProblemFeedback")
    public Answer<Object> addProblemFeedback(@RequestBody ProblemFeedback problemFeedback) {
        return problemFeedbackService.addProblemFeedback(problemFeedback);
    }

    @RequestMapping("/updateProblemFeedbackById")
    public Answer<Object> updateProblemFeedbackById(@RequestBody ProblemFeedback problemFeedbac) {
        return problemFeedbackService.updateProblemFeedbackById(problemFeedbac);
    }

    @RequestMapping("/deleteProblemFeedbackById")
    public Answer<Object> deleteProblemFeedbackById(@RequestBody JSONObject reqJson) {
        return problemFeedbackService.deleteProblemFeedbackById(reqJson);
    }
}
